/*
 * ECARX Technology Limited is the owner of the copyright and the trade secret of this software.
 * Without permission, no one has the right to obtain, disclose or use this software in any way.
 */
package com.ecarx.systemui.plugin.ui.custom

import android.content.Context
import android.util.AttributeSet
import androidx.annotation.CallSuper

abstract class SystemBarButton : AlphaButton {
    constructor(context: Context?) : this(context, null) {}
    constructor(context: Context?, attrs: AttributeSet?) : this(context, attrs, 0) {}
    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(
        context,
        attrs,
        defStyleAttr
    ) {
        contentDescription = getContentDescriptionString()
        initView()
    }


    abstract fun getContentDescriptionString(): String

    @CallSuper
    open fun initView(){
        id = generateViewId()
    }
}